package com.hyy.demo.sample2;

import org.squirrelframework.foundation.fsm.UntypedAnonymousAction;
import org.squirrelframework.foundation.fsm.UntypedStateMachine;

/**
 * Created by hyygavin on 2017/12/11.
 */
public class MyAction extends UntypedAnonymousAction {
    final String name;

    MyAction(String name) {
        this.name = name;
    }

    @Override
    public void execute(Object from, Object to, Object event, Object context, UntypedStateMachine stateMachine) {
        System.out.println(from + "---" + to + " on " + event + " with context: " + context);
    }

    @Override
    public String name() {
        return name;
    }
}
